package Interface;

import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Toolkit;

import javax.swing.*;

import Language.Language;

public class Profil extends JFrame {

	protected JLabel lblLogin;
	protected JLabel lblPassword;
	protected JTextField txtLogin;
	protected JPasswordField txtPassword;
	protected JButton btnIdentification;
	protected JButton btnClose;
	protected JPanel pnlConteneur_main;
	
	public Profil(String title) {
		super(title);	
		
		// Conteneur principale
		pnlConteneur_main = (JPanel) new JPanel(); 
		pnlConteneur_main.setLayout(new GridBagLayout());
		GridBagConstraints contraintes = new GridBagConstraints();
		
		JLabel lblTest = new JLabel("test");
		contraintes.fill = GridBagConstraints.HORIZONTAL;
		contraintes.anchor = GridBagConstraints.NORTH;
		contraintes.weightx = 1.0;
		contraintes.weighty = 1.0;
		contraintes.gridx = 0; // colonne 0 
		contraintes.gridy = 0; // ligne 0
		contraintes.gridwidth = 1; // le composant s'etend sur 1 colonne 
		contraintes.gridheight = 1; // le composant s'etend sur 1 ligne
		pnlConteneur_main.add(lblTest, contraintes);
		
		this.add(pnlConteneur_main);
		
		// Taille de la fenetre
		this.setSize(500,300); 
		this.setVisible(true);
		Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
		this.setLocation((screen.width - this.getSize().width)/2,(screen.height - this.getSize().height)/2);
	}
	
}
